import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';



configScreenUntil(BuildContext context){
//If you wang to set the font size is scaled according to the system's "font size" assist option
  ScreenUtil.instance = ScreenUtil(width: 750, height: 1134)..init(context);//这里已6s作为参考图
}

//设置宽度
double setWidth(double width){
return ScreenUtil.getInstance().setWidth(width*2); //默认传入的是px,这里转化为pt 以为6s的缩放倍数为2
}

//设置高度 
double setHeight(double height){
 return ScreenUtil.getInstance().setWidth(height*2);
}


//设置字体大小
double setFont(double fontSize){
   return ScreenUtil.getInstance().setSp(fontSize*2);
}

//快速获取屏幕的宽度
double kscreenW = ScreenUtil.screenWidthDp;

//快速获取屏幕的高度
double kscreenH = ScreenUtil.screenHeightDp;

// //快速获取屏幕的缩放宽度
// double kscreenScaleW = ScreenUtil.getInstance().scaleHeight;

// //快速获取屏幕的缩放高度
// double kscreenScaleH = ScreenUtil.getInstance().scaleHeight;

//快速获取状态栏高度
double kstatusBarH = ScreenUtil.statusBarHeight/ScreenUtil.pixelRatio;


//快速获取底部安全区域高度
double kbottomBarH = ScreenUtil.bottomBarHeight/ScreenUtil.pixelRatio;